#include<bits/stdc++.h>
using namespace std;
int n,b,f,k;
int a[100005],ans,ton[100005];
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>a[i];
        ton[a[i]]++;
    }
    for(int i=1;i<=100005;i++){
        if(f==1&&ton[i]!=0){
            ton[k]-=min(ton[k],ton[i]);
        }
        if(f!=1&&ton[i]!=0){
            k=i;
            f=1;
        }
    }
    for(int i=1;i<=100005;i++){
        ans+=ton[i];
    }
    cout<<ans;
    fclose(stdin);
    fclose(stdout);
    return 0;
}

